// 排盘计算仅用到baziCalc,getLiunianData两个方法

import { baziCalc, getLiunianData } from './bazi.js'

// baziCalc 为八字全部信息传值可参考,详细注释可看bazi.js中的baziCalc方法
baziCalc({
  name: '测试',
  sex: 0,
  place: '测试',
  birthday: '2023-02-02 00:00',
  solartime: '2023-02-02 00:00'
})
//  getLiunianData 为当前流年大运中选择某一年的详细信息,详细注释可看bazi.js中的getLiunianData方法
getLiunianData(
  '2023',
  {
    nian: { tiangan: 'ren', dizhi: 'yin' },
    yue: { tiangan: 'gui', dizhi: 'chou' },
    ri: { tiangan: 'xin', dizhi: 'mao' },
    shi: { tiangan: 'wu', dizhi: 'zi' }
  }
)


// @eg baziCalc 返回结果示例
// @eg getLiunianData 返回结果可参考下面返回结果中的getLiunianDetail属性值


let returnExample = {
  param: {
    name: '测试',
    sex: 0,
    place: '测试',
    birthday: '2023-02-02 00:00',
    solartime: '2023-02-02 00:00'
  },
  lunarDateInfo: {
    lYear: 2023,
    lMonth: 1,
    lDay: 12,
    Animal: '虎',
    IMonthCn: '正月',
    IDayCn: '十二',
    cYear: 2023,
    cMonth: 2,
    cDay: 2,
    gzYear: '壬寅',
    gzMonth: '癸丑',
    gzDay: '辛卯',
    isToday: true,
    isLeap: false,
    nWeek: 4,
    ncWeek: '星期四',
    isTerm: false,
    Term: null,
    astro: '水瓶座'
  },
  name: '测试',
  sex: 0,
  place: '测试',
  birthday: '2023-02-02 00:00',
  solartime: '2023-02-02 00:00',
  sizhupinyin: {
    nian: { tiangan: 'ren', dizhi: 'yin' },
    yue: { tiangan: 'gui', dizhi: 'chou' },
    ri: { tiangan: 'xin', dizhi: 'mao' },
    shi: { tiangan: 'wu', dizhi: 'zi' }
  },
  baziChName: {
    nian: { tiangan: '壬', dizhi: '寅' },
    yue: { tiangan: '癸', dizhi: '丑' },
    ri: { tiangan: '辛', dizhi: '卯' },
    shi: { tiangan: '戊', dizhi: '子' }
  },
  dishi: { nian: '胎', yue: '养', ri: '绝', shi: '长生' },
  zizuo: { nian: '病', yue: '冠带', ri: '绝', shi: '胎' },
  nayin: { nian: '金箔金', yue: '桑拓木', ri: '松柏木', shi: '霹雳火' },
  cangganChNames: { nian: '甲丙戊', yue: '己癸辛', ri: '乙', shi: '癸' },
  shensha: {
    nian: ['天乙贵人', '文昌', '太极贵人', '亡神'],
    yue: ['寡宿'],
    ri: ['天乙贵人', '德贵人', '秀贵人', '将星', '桃花'],
    shi: [
      '文昌', '垣城',
      '天厨', '天医',
      '吊客', '桃花',
      '灾煞'
    ]
  },
  taiyuan: '甲辰',
  minggong: '甲辰',
  duichongshegnxiao: '鸡',
  sanshawei: '西',
  wenchangwei: '东北',
  benmingfo: '虚空藏菩萨',
  baziShishen: { nian: '伤官', yue: '食神', ri: '元女', shi: '正印' },
  cangganShishen: {
    nian: ['正财', '正官', '正印'],
    yue: ['偏印', '食神', '比肩'],
    ri: ['偏财'],
    shi: ['食神']
  },
  shiniandayun: {
    dayun: [
      {
        dayun: '甲寅',
        dayunArr: [ '甲', '寅' ],
        shishen: '正财',
        dishi: '胎',
        niansui: 1,
        nianfen: 2023,
        cangganshishen: '正财'
      },
      {
        dayun: '乙卯',
        dayunArr: [ '乙', '卯' ],
        shishen: '偏财',
        dishi: '绝',
        niansui: 11,
        nianfen: 2033,
        cangganshishen: '偏财'
      },
      {
        dayun: '丙辰',
        dayunArr: [ '丙', '辰' ],
        shishen: '正官',
        dishi: '墓',
        niansui: 21,
        nianfen: 2043,
        cangganshishen: '正印'
      },
      {
        dayun: '丁巳',
        dayunArr: [ '丁', '巳' ],
        shishen: '七杀',
        dishi: '死',
        niansui: 31,
        nianfen: 2053,
        cangganshishen: '正官'
      },
      {
        dayun: '戊午',
        dayunArr: [ '戊', '午' ],
        shishen: '正印',
        dishi: '病',
        niansui: 41,
        nianfen: 2063,
        cangganshishen: '七杀'
      },
      {
        dayun: '己未',
        dayunArr: [ '己', '未' ],
        shishen: '偏印',
        dishi: '衰',
        niansui: 51,
        nianfen: 2073,
        cangganshishen: '偏印'
      },
      {
        dayun: '庚申',
        dayunArr: [ '庚', '申' ],
        shishen: '劫财',
        dishi: '帝旺',
        niansui: 61,
        nianfen: 2083,
        cangganshishen: '劫财'
      },
      {
        dayun: '辛酉',
        dayunArr: [ '辛', '酉' ],
        shishen: '比肩',
        dishi: '临官',
        niansui: 71,
        nianfen: 2093,
        cangganshishen: '比肩'
      }
    ],
    explain: '起大运周岁：0岁9个月23天，每一交大运年11月25日起运(公历)。'
  },
  kongwang: ['辰巳', '寅卯', '午未', '午未'],
  getLiunianDetail: [
    {
      year: 2023,
      ganzhi: '癸卯',
      ganzhiArr: ['癸', '卯'],
      shishen: '食神',
      cangganshishen: '偏财'
    },
    {
      year: 2024,
      ganzhi: '甲辰',
      ganzhiArr: ['甲', '辰'],
      shishen: '正财',
      cangganshishen: '正印'
    },
    {
      year: 2025,
      ganzhi: '乙巳',
      ganzhiArr: ['乙', '巳'],
      shishen: '偏财',
      cangganshishen: '正官'
    },
    {
      year: 2026,
      ganzhi: '丙午',
      ganzhiArr: ['丙', '午'],
      shishen: '正官',
      cangganshishen: '七杀'
    },
    {
      year: 2027,
      ganzhi: '丁未',
      ganzhiArr: ['丁', '未'],
      shishen: '七杀',
      cangganshishen: '偏印'
    },
    {
      year: 2028,
      ganzhi: '戊申',
      ganzhiArr: ['戊', '申'],
      shishen: '正印',
      cangganshishen: '劫财'
    },
    {
      year: 2029,
      ganzhi: '己酉',
      ganzhiArr: ['己', '酉'],
      shishen: '偏印',
      cangganshishen: '比肩'
    },
    {
      year: 2030,
      ganzhi: '庚戌',
      ganzhiArr: ['庚', '戌'],
      shishen: '劫财',
      cangganshishen: '正印'
    },
    {
      year: 2031,
      ganzhi: '辛亥',
      ganzhiArr: ['辛', '亥'],
      shishen: '比肩',
      cangganshishen: '伤官'
    },
    {
      year: 2032,
      ganzhi: '壬子',
      ganzhiArr: ['壬', '子'],
      shishen: '伤官',
      cangganshishen: '食神'
    }
  ],
  fucaixigui: ['正东', '西南', '西南', '东北', '正南']
}
